
package buildings;

public class SynchronizedFloor {
    
    private Floor floor;

    public SynchronizedFloor(Floor floor) {
        this.floor = floor;
    }
    
    public synchronized int getSpaceCount() {
        return floor.getSpaceCount();
    }
    
    public synchronized float getTotalSquare() {
        return floor.getTotalSquare();
    }
    
    public synchronized int getTotalRoomCount() {
        return floor.getTotalRoomCount();
    }
    
    public synchronized Space[] getSpaces() {
        return floor.getSpaces();
    }
    
    public synchronized Space getSpaceByNumber(int number) {
        return floor.getSpaceByNumber(number);
    }
    
    public synchronized void setSpaceByNumber(int number, Space space) {
        floor.setSpaceByNumber(number, space);
    }
    
    public synchronized void addSpaceByNumber(int number, Space space) {
        floor.addSpaceByNumber(number, space);
    }
    
    public synchronized void deleteSpaceByNumber(int number) {
        floor.deleteSpaceByNumber(number);
    }
    
    public synchronized Space getBestSpace() {
        return floor.getBestSpace();
    }
    
    public synchronized Object clone() throws CloneNotSupportedException {
        return floor.clone();
    }
    
    public synchronized int hashCode() {
        return floor.hashCode();
    }
    
    public synchronized boolean equals(Object obj) {
        return floor.equals(obj);
    }
    
    public synchronized String toString() {
        return floor.toString();
    }
}
